package Song.Han.demo03;

public class RunnableImpl implements Runnable {
    private int ticket = 100;

    @Override
    public void run() {
        //判断是否有票
        while (ticket > 0) {
            if (ticket > 0) {
                System.out.println(Thread.currentThread().getName() + "正在卖第" + ticket + "张票");
                ticket--;
            }
        }
    }

}
